##include <stdio.h>
int main()
{
    int n;
    scanf("%d", &n);
    int a = 1;
    int b = 1;
    int c = 1;
    while (n > 2)
    {
        c = a + b;
        a = b;
        b = c;
        n--;
    }
    printf("%d\n", c);
    return 0;
}